freecivfandomcom-20200223-history
Talk:Game Anatomy
__TOC__ 2005..2010 archived Experimenting to see how changes from default affect the ai and to find undocumented features For the past month or so I have been experimenting with the rulesets to see what breaks the ai to find the limits of what can be done and still have a good game. I have even taken the dive and been reading the source code. When I am more confident in my findings I will edit this page appropriately, until then (and incase I lose interest) this is what I have found; AI In the beginning, the ai will build "city builders" (Settlers in the default ruleset) until it can't support them, then it will build other types of units. This means that if you remove the food upkeep cost, the ai will run itself into bankruptcy building them while not building others. Edit! This only applies when the ai starts on smaller islands. The ai will only spam city builders until it gains a certain amount of cities, after which it behaves more intelligently. So if it is stuck on an island without room for the min number, it stays locked in the "settler cycle." Furthermore, the ai will not consider using transports with less than 3 moves only one trasport slot to send settlers to other islands, even if the gap is only 1 square. So adding early sea transports (e.g. "Boats" in the Ancient era ruleset) acts as a handycap to ai players. They will build one or 2, but not use them. Edit! It is not the speed, it is the transport capacity! The ai will happily use Boats if the capacity is increased to 2. :For the record, now raised as . -- JTN The ai does not build fortresses. For any reason. When writing a ruleset, keep this in mind and think of ways you can offset this for ai players. This also means you should not make building fortresses/bases a necessity/over powered (e.g. bases that add resources, enable units/buildings etc). :True. The AI never considers building any kind of base. See . -- JTN The ai does not understand Tech upkeep. Do not use it or they will periodically set all income to gold (the ai has no tax level limits) and find themselves back in the stone age. This gets boring fast. In a similar vein, the CM (city manager) doesn't understand gold upkeep style 1, and will continually set citizens to tax collectors when pre-bonus gold <-20 (Most cities by 1000ad are like this). Style 0 (no gold upkeep) or Style 2 (gold upkeep comes from empire level, not city level) works fine. :Hm. This sounds similar to . But I thought gold_upkeep_style=0 was problematic too. -- JTN Undocumented Options In the terrain ruleset, where specials are listed in terrains, you can repeat specials to change the percentage. E.g; resources = "resource_game", "resource_furs", "resource_furs" Means that, when the map generator decides this terrain gets a special, 1/3 of the time it will pick game and the remaining 2/3 will be fur. This can be used for another reason. Ever wanted to be able to transform mountains with gold into hills and keep the gold, but don't want gold to appear (or at least appear rarely) in hills? Modify the hills resource list as following; resources = "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_coal", "resource_wine", "resource_gold", "resource_iron" Now 9/20 specials on hills will be coal, another 9/20 will be wine, and just 1/20 will be iron or gold. This means that in a normal map, there may be no hills with iron or gold, but you can transform mountains into hills without losing their specials. You can do the same with plains to make deserts more transformation friendly; resources = "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_buffalo", "resource_wheat", "resource_oasis", "resource_oil" This makes a lot of sense for mineral specials, and even some plant animal ones (at least for similar terrains). That is all for now. Yethic 08:57, June 13, 2012 (UTC) Changing a unit's obsolescence has no effect - for example, if Archers are set to be obsoleted by Legions, rather than Musketeers, they still show in the help file in-game as being obsoleted by Musketeers, and continue to appear in the build list until Musketeers are discovered. 00:49, December 18, 2012 (UTC) That can happen only if you are not in fact using your modified rulesets. What the ruleset says about unit obsoleting another is the only way game gets such information - if ruleset didn't say that Archers are obsoleted by Musketeers, they would not be. Try to change ruleset description in game.ruleset, and see if your modified version gets displayed in Help -> About Ruleset. Maybe your ruleset has some syntax error causing its loading to fail and freeciv server fallbacking to default ruleset. Maybe you have another version of the ruleset in another directory that gets picked up. Cazfi (talk) 01:03, December 18, 2012 (UTC) An example from the current units.ruleset unit_archers name = _("Archers") class = "Land" tech_req = "Warrior Code" obsolete_by = "Legion" graphic = "u.archers" graphic_alt = "-" sound_move = "m_archers" sound_move_alt = "m_generic" sound_fight = "f_archers" sound_fight_alt = "f_generic" build_cost = 30 pop_cost = 0 attack = 3 defense = 2 hitpoints = 10 firepower = 1 move_rate = 1 vision_radius_sq = 2 transport_cap = 0 fuel = 0 uk_happy = 0 uk_shield = 0 uk_food = 0 uk_gold = 0 flags = "" roles = "DefendOk" helptext = _("\ Archers fight with bows and arrows and have a good offensive\ value as well as decent defense.\ ") unit_legion name = _("Legion") class = "Land" tech_req = "Iron Working" obsolete_by = "Musketeers" graphic = "u.legion" graphic_alt = "-" sound_move = "m_legion" sound_move_alt = "m_generic" sound_fight = "f_legion" sound_fight_alt = "f_generic" build_cost = 40 pop_cost = 0 attack = 4 defense = 2 hitpoints = 10 firepower = 1 move_rate = 1 vision_radius_sq = 2 transport_cap = 0 fuel = 0 uk_happy = 0 uk_shield = 0 uk_food = 0 uk_gold = 0 flags = "" roles = "DefendOk", "Hut", "BarbarianBuild", "BarbarianSea" helptext = _("\ Legions are heavily armed and well disciplined infantry\ units with an excellent offensive value.\ ") The game is set to use this ruleset, and doesn't throw any errors, either when selecting the ruleset or starting the game. 01:16, December 18, 2012 (UTC) If you are ready to send ruleset to me (See Help -> About Freeciv for my email) I can check and test it. I can't think any other way for me to help you to debug this. Which version of Freeciv are you using? Cazfi (talk) 01:33, December 18, 2012 (UTC) Game Mods Section Structure Okay, wow, this is setup kinda terribly, isn't it? First, the Top of this deal should be something like "Freeciv Anatomy" At the top should be the 'top' level of links: The next row of links should be to basic parts of the game with their own pages: The next row of links should be to modifying these parts of the game with their own pages: These links should be on ALL the described sub-pages. Freeciv Anatomy | Freeciv Modding ------------------------------------------------------ Servers | Clients | Rulesets | Tilesets | Soundsets | Musicsets | Scenarios | Event Scripting | Themes ------------------------------------------------------ Editing Rulesets | Editing Tilesets | Editing Soundsets | Editing Musicsets Editing Scenarios | Editing Event Scripts | Editing Themes In the top page, "Freeciv Anatomy" This page should give a basic overview of the parts of the game: Server, Client, Ruleset, Tileset, Soundset, Musicset, Scenario, Event Script, Theme. Each overview should end with a link to the appropriate part's own page. Next page would be this one's replacement, "Freeciv Modding" This page should give a basic overview of editing the parts of the game ASIDE from hardcode: Editing Rulesets, Editing Tilesets, Editing Soundsets, Editing Musicsets, Editing Scenarios, Editing Event Scripts, Editing Themes. Each overview should end with a link to the appropriate part's own page. Next, we have the individual parts. Each should include the overview at the top, but then go into more detail. It should be described in terms of features, rather than mechanics. There should also be overviews for each example of them that is maintained in the official release, with links to appropriate pages if they exist. The links to these sub-pages should also be at the top in an additional row. example, Tilesets. There would be the additional row of links for the individual tilesets (If they have their own pages!): Trident | Isotrident | Amplio2 | Cimpletoon | Hex2t | Isophex | Hexemplio | Toonhex | Alio At the top would be the Tileset overview, but then the next section would have general overviews of the features of tilesets, for example, information about topologies. The final section would be the general overviews of the individual tilesets, with links to each individual tileset's page, if applicable. Next would be the sub-pages of the individual types, like Trident, etc. that would go into detail of that particular tileset. Next would be the editing individual parts pages. Each should include the overview at the top, but then go into more detail. It should be described in terms of mechanics. There should also be overviews for each file of them that is maintained in the official release, with links to appropriate pages if they exist. The links to these sub-pages should also be at the top in an additional row. Example, Editing Tilesets: Sprite Sheets | Spec Files | Tilespec Files | Serv Files At the top would be the editing tilesets overview, but the next section would have general overviews of each of the tileset mechanics, for example, blending styles or sprite types. The final section would be the general overviews of the individual tileset file types, with links to each individual tileset file type's page, if applicable. Note that Rulesets, for example, would instead have one for each file that appears in a ruleset: Buildings | Cities | Effects | Game | Governments | Nations | LUA | Styles | Techs | Terrain | Units Does that sound like a much better way to set it up? GriffonSpade (talk) 19:26, February 15, 2018 (UTC)